* This file Is the Dyadic Analysis on Economic Growth;
**Last updated 2 April 2021;

#delimit ;
clear;
set more off;
clear matrix;

capture log close;
log using "D:\Stata Data\EcoGrow\Dyadic_Analysis.smcl",replace;
use "D:\Stata Data\EcoGrow\dyadic_analysis.dta", clear;  
set matsize 200;
cd "D:\Stata Data\EcoGrow\";
iis (dyad);
tis (year);
gen dem=1 if dem1>8;
recode dem .= 0;

************************************Onset Models;
**Dyadic War Results, Table 2 Row 1;
logit warL GDPma5_1 majpow1 dep1 Lcaprat dem gdpcap1 contig multipol peaceyrm_war war_spl1 war_spl2 war_spl3 , cluster(dyad) robust;
outreg using Table2.txt, se bdec(4,4) replace;
listcoef GDPma5_1 majpow1 dep1 Lcaprat dem gdpcap1 contig  multipol , percent help;

**Table 2 Row 2;
logit warL GDPma5_1 dem_reg1 majpow1 dep1 Lcaprat dem gdpcap1 contig multipol  peaceyrm_war war_spl1 war_spl2 war_spl3, cluster(dyad) robust;
outreg using Table2.txt,se bdec(4,4) append;
listcoef GDPma5_1 majpow1 dep1 Lcaprat dem gdpcap1 contig  multipol dem_reg1, percent help;


log close;
clear;
exit,STATA; 


